package com.xhtt.modules.app.controller.photo;

import com.xhtt.common.utils.R;
import com.xhtt.modules.photo.entity.PhotoStagePhoto;
import com.xhtt.modules.photo.service.IPhotoStagePhotoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 * 现场拍照-装车台拍照
 * </p>
 *
 * @author xj
 * @since 2019-01-18
 */
@RestController
@RequestMapping("app/photo-stage-photo")
@Api(value = "现场拍照-装车台拍照", tags = "现场拍照-装车台拍照")
public class PhotoStagePhotoController {

    @Autowired
    private IPhotoStagePhotoService photoStagePhotoService;

    @PostMapping(value = "/add")
    @ApiOperation("现场拍照-保存装车台拍照(app)")
    public R add(@RequestBody PhotoStagePhoto photoStagePhoto) {
        photoStagePhotoService.save(photoStagePhoto);
        return R.ok();
    }

    @GetMapping(value = "list")
    @ApiOperation("现场拍照-获取列表")
    public R list(@RequestParam Map<String, Object> params) {
        photoStagePhotoService.queryPage(params);
        return R.ok();
    }
}
